package haha;

public class MainMain {
    public static void main(String[] args) {
        Outer outer = new Outer();
        /*Outer.Inner innerObject = outer.new Inner();
        innerObject.say();*/
//        outer.fn(99);

        Outer.InnerB outInnerB = new Outer.InnerB();//静态内部类 创建对象

        int arg = 999;
        outer.fn1(new Live() {
            int abc = 85;//这个是Live 内部类的成员变量

            @Override
            public void eat() {
                abc++;
//             arg++ 报错
                System.out.println("局部匿名内部类的典型用法");
            }

            @Override
            public void sleep() {
                System.out.println("局部匿名内部类的典型用法");
            }
        });

        System.out.println(new Object() {
            @Override
            public String toString() {
                return "这是无聊的代码";
            }
        });
    }
}
